/**
 * Created by Administrator on 2016/2/24.
 */
var otherService = angular.module('OtherService');
otherService.factory("api_other", function($http,api_path){

    var base_addr = api_path.base_addr;
    var api_addr = api_path.api_addr;
    return {
        //考试列表(初始进入)
        testList:function(obj){
            var params = {parent_id:obj};
            var the_api = base_addr + api_addr.test_list;
            var promise = $http.post(the_api,params,{headers:{'Content-Type':'application/x-www-form-urlencoded'}});
            return promise;
        },
        //登录
        userLogin:function(obj){
            var obj = JSON.stringify(obj);
            var the_api = base_addr + api_addr.user_login;
            var promise = $http.post(the_api,obj,{headers:{'Content-Type':'application/json;charset=UTF-8'}});
            //var promise = $http.post(the_api,obj,{headers:{'Content-Type':'application/x-www-form-urlencoded'}});
            //var promise = $http.get(the_api,{headers:{'Content-Type':'application/x-www-form-urlencoded'}});
            return promise;
        },
    };
});